<template>

  <div>
    <div style="width:100%; padding:5px 0px 0px 10px">
      <table style=" width:100%; border-collapse: collapse;">
        <tr height="5px">
          <td style="font-size: 4px;" nowrap="nowrap">{{item.message.patient.hospitalNumber}} &nbsp; </td>
          <!-- 血袋数:{{item.message.detail.length}} -->
        </tr>
        <tr height="15px">
          <td style="font-size: 4px;" nowrap="nowrap">
            {{getBasMaterial("Department",item.message.patient.dependency)}} &nbsp; {{item.message.patient.berth}}床</td>
        </tr>
        <tr height="15px">
          <td style="font-size: 4px;" nowrap="nowrap">{{item.message.patient.name}} &nbsp;
            {{getEnum("BasSex",item.message.patient.sex)}} &nbsp; {{item.message.patient.age}}</td>
        </tr>
      </table>
    </div>
    <div style="width:50%; padding:10px;margin-top:-10px">
      <svg id="barcode2"></svg>
      <div>{{GetBarcode("#barcode2",item.message.master.billNo,"CODE128",30,1.2,0,12,0)}}</div>
    </div>
  </div>

</template>

<script>
export default {
  name: 'NursingPrint',
  methods: {
    //getBasMaterial(UserId)  //根据用户ID获取用户名
    getUserName() {
      return 'username'
    },

    //getEnum("BasSex",id) //获取枚举名称
    getEnum() {
      return '未知'
    },

    //getBasMaterial("Department",id) //获取部门
    //getBasMaterial("BloodVariety",id) //获取血液品种名称
    //getBasMaterial("BloodVariety",id) //获取血液产品名称
    getBasMaterial() {
      return 'xxx'
    }
  },
  data: function() {
    return {
      item: {
        traPatient: {
          billNo: 'APL191214001',
          patientId: 1,
          hospitalNumber: '001',
          name: '张三',
          sex: 0,
          age: '18',
          birthday: null,
          dependency: null,
          apanage: 0,
          abo: 'A',
          rhD: 'RH+',
          transfuseHistory: -1,
          reactionHistory: -1,
          gestationHistory: -1,
          parturitionHistory: -1,
          transplantMatchHistory: -1,
          basDepartmentId: 1,
          basSingleDiseaseId: null,
          patientType1: 0,
          patientType2: 0,
          isWrittenConsent: true,
          berth: 123,
          clinicDiagnose: '头晕和眩晕',
          traAim: '补充红细胞同时扩充血容量'
        },
        traMaster: {
          creatorUserId: 2
        },
        traDetail: {
          billNo: 'APL191214001',
          basBloodVarietyId: 2,
          applyBloodType: 'A',
          applyRhD: 'RH+',
          applySum: 12,
          specialProcessing: null,
          replaceBloodVarietyId: null,
          remark: null,
          beforeSurgery: null,
          otherIllustrates: '123',
          isTypeReview: false,
          basSxhlx: 1,
          varietyNorm: null,
          traSpecimenInfoId: null,
          hasSum: 300,
          bloodOutSum: 100,
          basBloodVariety: {
            lastModifierUserId: null,
            lastModificationTime: null,
            code: '2',
            name: '血浆',
            isEnabled: true,
            unit: 'ml',
            isCrossMatch: true,
            basXyzl: 2,
            isQuantity: true,
            unitRate: 1,
            id: 2
          }
        },
        basPatient: {
          id: 1,
          hospitalNumber: '001',
          name: '蔡虚坤',
          sex: 0,
          age: '18',
          birthday: null,
          apanage: 0,
          abo: 'A',
          rhD: 'RH+',
          transfuseHistory: -1,
          reactionHistory: -1,
          gestationHistory: -1,
          parturitionHistory: -1,
          transplantMatchHistory: -1,
          matchHistory: 0,
          lastTypeReviewBillNo: 'REV191214001',
          lastTypeReviewTime: '2019-12-14 14:52:53',
          typeReviewBillDetail: {
            billNo: 'REV191214001',
            aboPositive: null,
            aboNegative: null,
            aboResult: 'A',
            subtype: null,
            rhDResult: 'RH+',
            antibodyScreen1: null,
            antibodyScreen2: null,
            antibodyScreen3: null,
            antibodyScreenResult: '阴性',
            antiHumanGlobulin: null,
            plAntiScreen: null,
            plInspectDate: null
          }
        },
        reviewDetail: {
          billNo: 'REV191214001',
          aboPositive: null,
          aboNegative: null,
          aboResult: 'A',
          subtype: null,
          rhDResult: 'RH+',
          antibodyScreen1: null,
          antibodyScreen2: null,
          antibodyScreen3: null,
          antibodyScreenResult: '阴性',
          antiHumanGlobulin: null,
          plAntiScreen: null,
          plInspectDate: null
        },
        reviewMaster: {
          traApplyBillNo: 'APL191214001',
          reCheckUserId: null,
          checkUserId: 2,
          checkTime: '2019-12-14 14:52:47',
          billNo: 'REV191214001',
          manualNo: null,
          billType: null,
          billStatus: 3,
          auditUserId: 2,
          auditTime: '2019-12-14 14:52:48',
          remark: null,
          basDepartmentId: null,
          hospitalNumber: null,
          dependency: null,
          berth: null,
          patientName: null,
          isDeleted: false,
          deleterUserId: null,
          deletionTime: null,
          lastModificationTime: null,
          lastModifierUserId: null,
          creationTime: '2019-12-14 14:52:45',
          creatorUserId: 2,
          id: 'REV191214001'
        },
        master: {
          billNo: 'BOU191214001',
          manualNo: null,
          billType: null,
          billStatus: 3,
          auditUserId: null,
          auditTime: '2019-12-14 15:25:20',
          remark: null,
          traApplyBillNo: 'APL191214001',
          beforeTemperature: null,
          receiveUserId: 2,
          informReceiveDate: null,
          creatorUserId: 2,
          creationTime: '2019-12-14 15:23:07',
          sendUserId: 3,
          isBloodOut: true,
          traTypeReviewBillNo: 'REV191214001',
          hasSum: null
        },
        reportTime: '2019-12-14 16:13:36',
        matchingUserName: '测试',
        reviewUserName: '测试2'
      },
      name: '血液交叉配血报告单',
      list: [
        {
          billNo: 'BOU191214001',
          invBloodInfoId: 2,
          traPxffId: 2,
          reviewTraPxffId: 2,
          result: 0,
          matchingDate: '2019-12-14 15:05:33',
          traCrossMatchBillNo: 'MAT191214001',
          invBloodInfo: {
            code: '440123456789255001',
            ownNumber: null,
            basBloodProductId: '001',
            basBloodProductName: null,
            abo: 'A',
            rhD: 'RH+',
            volume: 100,
            unit: 'ml',
            warehousingPrice: 100,
            status: 1,
            specialProcessing: null,
            effectiveDate: '2019-12-14 15:04:06',
            gatheringDate: '2019-12-10 11:04:06',
            makeDate: null,
            bloodDonationCode: '440123456789255',
            isRecycle: false,
            basBloodProduct: { basBloodVarietyName: '红细胞' },
            sinceNumber: 123,
            isDeleted: false,
            deleterUserId: null,
            deletionTime: null,
            lastModificationTime: '2019-12-14 15:25:21',
            lastModifierUserId: 2,
            creationTime: '2019-12-14 15:05:03',
            creatorUserId: 2,
            id: 2
          },
          isReturn: false,
          traTscl: null
        }
      ]
    }
  }
}
</script>
